ga.core.validation
Class GAContext

java.lang.Object
  extended by java.util.AbstractMap<K,V>
      extended by java.util.HashMap<java.lang.String,java.lang.Object>
          extended by ga.core.validation.GAContext
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, java.util.Map<java.lang.String,java.lang.Object>

public class GAContext
extends java.util.HashMap<java.lang.String,java.lang.Object>

The context of the GA. This is a HashMap used to transport required data to all components of the algorithm.

Since:
11.08.2012
Author:
Stephan Dreyer
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class java.util.AbstractMap
java.util.AbstractMap.SimpleEntry<K,V>, java.util.AbstractMap.SimpleImmutableEntry<K,V>
 
Constructor Summary
GAContext()
           
 
Method Summary
 java.lang.Float getFloat(java.lang.String key)
          Gets a Float from the map.
 java.lang.Float getFloat(java.lang.String key, float dfault)
          Gets a Float from the map.
 java.lang.Integer getInt(java.lang.String key)
          Gets an Integer from the map.
 java.lang.Integer getInt(java.lang.String key, int dfault)
          Gets an Integer from the map.
 java.lang.Object put(java.lang.String key, java.lang.Object value)
           
 
Methods inherited from class java.util.HashMap
clear, clone, containsKey, containsValue, entrySet, get, isEmpty, keySet, putAll, remove, size, values
 
Methods inherited from class java.util.AbstractMap
equals, hashCode, toString
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.Map
equals, hashCode
 

Constructor Detail

GAContext

public GAContext()
Method Detail

getInt

public java.lang.Integer getInt(java.lang.String key)
Gets an Integer from the map. Returns null if the key does not exist.

Parameters:
key - Key of the value.
Returns:
The value or null.
Since:
11.08.2012
See Also:
HashMap.get(Object)

getInt

public java.lang.Integer getInt(java.lang.String key,
                                int dfault)
Gets an Integer from the map. Returns the default value if the key does not exist.

Parameters:
key - Key of the value.
dfault - Default value.
Returns:
The value or default value.
Since:
11.08.2012
See Also:
getInt(String), HashMap.get(Object)

put

public java.lang.Object put(java.lang.String key,
                            java.lang.Object value)
Specified by:
put in interface java.util.Map<java.lang.String,java.lang.Object>
Overrides:
put in class java.util.HashMap<java.lang.String,java.lang.Object>

getFloat

public java.lang.Float getFloat(java.lang.String key)
Gets a Float from the map. Returns null if the key does not exist.

Parameters:
key - Key of the value.
Returns:
The value or null.
Since:
11.08.2012
See Also:
HashMap.get(Object)

getFloat

public java.lang.Float getFloat(java.lang.String key,
                                float dfault)
Gets a Float from the map. Returns the default value if the key does not exist.

Parameters:
key - Key of the value.
dfault - Default value.
Returns:
The value or default value.
Since:
11.08.2012
See Also:
getFloat(String), HashMap.get(Object)